package com.scau402.system1.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.scau402.common.core.domain.entity.SysUser;
import com.scau402.common.core.page.TableDataInfo;
import com.scau402.system1.domain.po.WmsOutboundOrderDO;
import com.scau402.system1.domain.query.WmsOutboundOrderQuery;
import com.scau402.system1.domain.vo.WmsOutboundOrderAndDetailVO;

import java.util.List;

/**
 * <p>
 * 商品出库单主表 服务类
 * </p>
 *
 * @author
 * @since 2023-12-23
 */
public interface IWmsOutboundOrderService extends IService<WmsOutboundOrderDO> {

    /**
     * 获取最新的出库单编号
     * @param user
     * @return
     */
    String getNewCode(SysUser user) throws InterruptedException;

    /**
     * 获取出库单编号
     *
     * @param loginUserTenantCode
     * @param userCode
     * @return
     * @throws InterruptedException
     */
    String getOutboundOrderCode(String loginUserTenantCode, String userCode) throws InterruptedException;

    /**
     * 获取最大的出库单编号
     *
     * @return
     */
    String getMaxCode();

    boolean checkOrderCodeExist(String currentOrderCode);

    TableDataInfo selectWmsOutboundOrderListPage(WmsOutboundOrderQuery query);


    void merge( List<Long> outboundOrderIds) throws InterruptedException;

    List<WmsOutboundOrderAndDetailVO> selectWmsOutboundOrderListByCodes(WmsOutboundOrderQuery query);

}
